package com.wicket.okrbff.biz.service.impl;
import cn.hutool.core.bean.BeanUtil;
import com.wicket.okrapp.integration.dto.*;
import com.wicket.okrbff.biz.service.TargetTempService;
import com.wicket.okrbff.common.ro.OkrResult;
import com.wicket.okrbff.biz.service.dto.req.*;
import com.wicket.okrbff.biz.service.dto.res.*;
import com.wicket.okrframework.integration.dto.*;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import com.wicket.okrbff.common.ro.OkrResult;
import com.wicket.okrbff.common.util.CommonFunctionHelper;
import com.wicket.okrbff.common.util.RedisUtil;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import com.wicket.okrbff.common.exception.Assert;
import com.wicket.okrapp.integration.FwAppTargetTempClient;
import com.wicket.okrbff.biz.service.dto.common.BffTargetTempDto;
import java.util.stream.Collectors;

import com.wicket.okrbff.biz.service.dto.common.BffContTagRcordDto;
import com.wicket.okrframework.integration.FwBaseInductionRecordClient;
import cn.hutool.core.collection.CollectionUtil;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@Service
public class TargetTempServiceImpl implements TargetTempService {

    @Resource
    private RedisUtil redisUtil;
@Resource
  FwAppTargetTempClient fwAppTargetTempClient;
@Resource
  FwBaseInductionRecordClient fwBaseInductionRecordClient;
/**
   * B3-1查标签关系下我创建的指标模板列表(管理)[2712]
   * gen by moon at 12/9/2022, 2:27:52 PM
   */
    @Trace(operationName = "B3-1查标签关系下我创建的指标模板列表(管理)")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffQueryTagRelIcreateTargetTempListRespDto queryTagRelIcreateTargetTempList(BffQueryTagRelIcreateTargetTempListReqDto reqDto){
      
       
       QueryTagRelTargetTempListRespDto queryTagRelTargetTempListRespDto_1 =null;
//步骤0: D3-1查标签关系下指标模板列表 - queryTagRelTargetTempList
     QueryTagRelTargetTempListRespDto queryTagRelTargetTempListRespDto = null;
    QueryTagRelTargetTempListReqDto queryTagRelTargetTempListReqDto=new QueryTagRelTargetTempListReqDto();
  queryTagRelTargetTempListReqDto.setIsTemporaryLock("TRUE");//sourceId:499242_1
  queryTagRelTargetTempListReqDto.setCreateInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID//sourceId:84631_1
queryTagRelTargetTempListReqDto.setIsArchive("FALSE");//sourceId:89665_1
if(reqDto!=null){
      queryTagRelTargetTempListReqDto.setContTagRcordList(reqDto.getContTagRcordList());//list-field-assign//sourceId:89664_1
queryTagRelTargetTempListReqDto.setObjectiveTemplateName(reqDto.getObjectiveTemplateName());//SimpleFieldAssign//sourceId:89667_1
queryTagRelTargetTempListReqDto.setObjectiveTemplateType(reqDto.getObjectiveTemplateType());//SimpleFieldAssign//sourceId:89668_1
queryTagRelTargetTempListReqDto.setObjectiveValueType(reqDto.getObjectiveValueType());//SimpleFieldAssign//sourceId:89669_1
queryTagRelTargetTempListReqDto.setEvaluationTemplateId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:419588_1
queryTagRelTargetTempListReqDto.setObjectiveValueSource(reqDto.getObjectiveValueSource());//SimpleFieldAssign//sourceId:419996_1
    }
  
    /*D3-1查标签关系下指标模板列表[2710]   */
    Assert.isNull(queryTagRelTargetTempListReqDto.getEvaluationTemplateId(),"B3-1查标签关系下我创建的指标模板列表(管理)-D3-1查标签关系下指标模板列表-冗余评价模板ID不能为空",false);
Assert.isNull(queryTagRelTargetTempListReqDto.getIsTemporaryLock(),"B3-1查标签关系下我创建的指标模板列表(管理)-D3-1查标签关系下指标模板列表-临时锁定不能为空",false);
Assert.isNull(queryTagRelTargetTempListReqDto.getCreateInductionId(),"B3-1查标签关系下我创建的指标模板列表(管理)-D3-1查标签关系下指标模板列表-创建人就职记录ID不能为空",false);
Assert.isNull(queryTagRelTargetTempListReqDto.getIsArchive(),"B3-1查标签关系下我创建的指标模板列表(管理)-D3-1查标签关系下指标模板列表-是否存档不能为空",false);
      queryTagRelTargetTempListRespDto = fwAppTargetTempClient.queryTagRelTargetTempList(queryTagRelTargetTempListReqDto).getData();
      
      
      queryTagRelTargetTempListRespDto_1 = queryTagRelTargetTempListRespDto;
    
BffQueryTagRelIcreateTargetTempListRespDto retData = new BffQueryTagRelIcreateTargetTempListRespDto();
  if(queryTagRelTargetTempListRespDto_1!=null){
      retData.setTargetTempList(queryTagRelTargetTempListRespDto_1.getTargetTempList().stream().map(item -> BeanUtil.toBean(item, BffTargetTempDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:419633_1
    }
  

  
  
return retData;
  }
/**
   * B3-1查标签关系下指标模板列表(边界)[2618]
   * gen by moon at 6/20/2023, 6:25:17 PM
   */
    @Trace(operationName = "B3-1查标签关系下指标模板列表(边界)")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffQueryTagRelTargetTempListBorderRespDto queryTagRelTargetTempListBorder(BffQueryTagRelTargetTempListBorderReqDto reqDto){
      
       
       QueryTagRelTargetTempListRespDto queryTagRelTargetTempListRespDto_1 =null;
//步骤0: D3-1查标签关系下指标模板列表 - queryTagRelTargetTempList
     QueryTagRelTargetTempListRespDto queryTagRelTargetTempListRespDto = null;
    QueryTagRelTargetTempListReqDto queryTagRelTargetTempListReqDto=new QueryTagRelTargetTempListReqDto();
  queryTagRelTargetTempListReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:419628_1
if(reqDto!=null){
      queryTagRelTargetTempListReqDto.setContTagRcordList(reqDto.getContTagRcordList());//list-field-assign//sourceId:89661_1
queryTagRelTargetTempListReqDto.setObjectiveTemplateName(reqDto.getObjectiveTemplateName());//SimpleFieldAssign//sourceId:84623_1
queryTagRelTargetTempListReqDto.setObjectiveTemplateType(reqDto.getObjectiveTemplateType());//SimpleFieldAssign//sourceId:89640_1
queryTagRelTargetTempListReqDto.setObjectiveValueType(reqDto.getObjectiveValueType());//SimpleFieldAssign//sourceId:89641_1
queryTagRelTargetTempListReqDto.setObjectiveValueSource(reqDto.getObjectiveValueSource());//SimpleFieldAssign//sourceId:89642_1
queryTagRelTargetTempListReqDto.setEvaluationTemplateId(reqDto.getEvaluationTemplateId());//SimpleFieldAssign//sourceId:419586_1
    }
  
    /*D3-1查标签关系下指标模板列表[2710]   */
    Assert.isNull(queryTagRelTargetTempListReqDto.getEvaluationTemplateId(),"B3-1查标签关系下指标模板列表(边界)-D3-1查标签关系下指标模板列表-冗余评价模板ID不能为空",false);
Assert.isNull(queryTagRelTargetTempListReqDto.getSubjectLifeCycle(),"B3-1查标签关系下指标模板列表(边界)-D3-1查标签关系下指标模板列表-主体生命周期不能为空",false);
      queryTagRelTargetTempListRespDto = fwAppTargetTempClient.queryTagRelTargetTempList(queryTagRelTargetTempListReqDto).getData()/*vcase invoke 跨dubbo调用;*/;
      
      
      queryTagRelTargetTempListRespDto_1 = queryTagRelTargetTempListRespDto;
    
BffQueryTagRelTargetTempListBorderRespDto retData = new BffQueryTagRelTargetTempListBorderRespDto();
  if(queryTagRelTargetTempListRespDto_1!=null){
      retData.setTargetTempList(queryTagRelTargetTempListRespDto_1.getTargetTempList().stream().map(item -> BeanUtil.toBean(item, BffTargetTempDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:419631_1
    }
  

  retData.setPageNum(queryTagRelTargetTempListRespDto.getPageNum());
        retData.setPageSize(queryTagRelTargetTempListRespDto.getPageSize());
        retData.setTotal(queryTagRelTargetTempListRespDto.getTotalNum());
        retData.setIsLastPage((Math.ceil(Double.valueOf(queryTagRelTargetTempListRespDto.getTotalNum()) / Double.valueOf(queryTagRelTargetTempListRespDto.getPageSize()))) <= retData.getPageNum());

  
return retData;
  }
/**
   * B3-1查指标模板详情(边界)[2619]
   * gen by moon at 12/9/2022, 2:27:51 PM
   */
    @Trace(operationName = "B3-1查指标模板详情(边界)")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffQueryTargetTempDetailBorderRespDto queryTargetTempDetailBorder(BffQueryTargetTempDetailBorderReqDto reqDto){
      
       
       QueryTargetTempDetailComRespDto queryTargetTempDetailComRespDto_1 =null;
//步骤0: D3-1查指标模板详情(公共) - queryTargetTempDetailCom
     QueryTargetTempDetailComRespDto queryTargetTempDetailComRespDto = null;
    QueryTargetTempDetailComReqDto queryTargetTempDetailComReqDto=new QueryTargetTempDetailComReqDto();
  if(reqDto!=null){
      queryTargetTempDetailComReqDto.setObjectiveTemplateId(reqDto.getObjectiveTemplateId());//SimpleFieldAssign//sourceId:84674_1
    }
  
    /*D3-1查指标模板详情(公共)[2713]   */
    Assert.isNull(queryTargetTempDetailComReqDto.getObjectiveTemplateId(),"B3-1查指标模板详情(边界)-D3-1查指标模板详情(公共)-指标模板ID不能为空",false);
      queryTargetTempDetailComRespDto = fwAppTargetTempClient.queryTargetTempDetailCom(queryTargetTempDetailComReqDto).getData();
      
      
      queryTargetTempDetailComRespDto_1 = queryTargetTempDetailComRespDto;
    
BffQueryTargetTempDetailBorderRespDto retData = new BffQueryTargetTempDetailBorderRespDto();
  if(queryTargetTempDetailComRespDto_1!=null){
      retData.setObjectiveTemplateId(queryTargetTempDetailComRespDto_1.getObjectiveTemplateId());//SimpleFieldAssign//sourceId:84680_1
retData.setObjectiveTemplateName(queryTargetTempDetailComRespDto_1.getObjectiveTemplateName());//SimpleFieldAssign//sourceId:499263_1
retData.setObjectiveTemplateDesc(queryTargetTempDetailComRespDto_1.getObjectiveTemplateDesc());//SimpleFieldAssign//sourceId:499264_1
retData.setObjectiveTemplate(queryTargetTempDetailComRespDto_1.getObjectiveTemplate());//SimpleFieldAssign//sourceId:84682_1
retData.setObjectiveTemplateType(queryTargetTempDetailComRespDto_1.getObjectiveTemplateType());//SimpleFieldAssign//sourceId:90424_1
retData.setObjectiveValueType(queryTargetTempDetailComRespDto_1.getObjectiveValueType());//SimpleFieldAssign//sourceId:90425_1
retData.setIsTargetValue(queryTargetTempDetailComRespDto_1.getIsTargetValue());//SimpleFieldAssign//sourceId:499266_1
retData.setUnit(queryTargetTempDetailComRespDto_1.getUnit());//SimpleFieldAssign//sourceId:90426_1
retData.setDigitalUnit(queryTargetTempDetailComRespDto_1.getDigitalUnit());//SimpleFieldAssign//sourceId:499267_1
retData.setObjectiveValueSource(queryTargetTempDetailComRespDto_1.getObjectiveValueSource());//SimpleFieldAssign//sourceId:90427_1
retData.setIsLeft(queryTargetTempDetailComRespDto_1.getIsLeft());//SimpleFieldAssign//sourceId:499265_1
retData.setSystemDockingType(queryTargetTempDetailComRespDto_1.getSystemDockingType());//SimpleFieldAssign//sourceId:499268_1
retData.setContTagRcordList(queryTargetTempDetailComRespDto_1.getContTagRcordList().stream().map(item -> BeanUtil.toBean(item, BffContTagRcordDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:84683_1
    }
  

  
  
return retData;
  }
/**
   * B3-1查我创建的指标模板列表(管理)[2206]
   * gen by moon at 10/18/2022, 10:04:33 PM
   */
    @Trace(operationName = "B3-1查我创建的指标模板列表(管理)")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffQueryMyCreateTargetTempListRespDto queryMyCreateTargetTempList(BffQueryMyCreateTargetTempListReqDto reqDto){
      
       
       QueryTargetTempListRespDto queryTargetTempListRespDto_1 =null;
BatchQueryInductionRecordListComRespDto batchQueryInductionRecordListComRespDto_1 =null;
//步骤0: D3-1查指标模板列表 - queryTargetTempList
     QueryTargetTempListRespDto queryTargetTempListRespDto = null;
    QueryTargetTempListReqDto queryTargetTempListReqDto=new QueryTargetTempListReqDto();
  queryTargetTempListReqDto.setCreateInductionId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecInductionRecordId());//CURRENT_INDUCTIONID//sourceId:348833_1
queryTargetTempListReqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:348834_1
if(reqDto!=null){
      queryTargetTempListReqDto.setContTagRcordList(reqDto.getContTagRcordList());//list-field-assign//sourceId:213928_1
queryTargetTempListReqDto.setObjectiveTemplateName(reqDto.getObjectiveTemplateName());//SimpleFieldAssign//sourceId:348826_1
queryTargetTempListReqDto.setApplyStatus(reqDto.getApplyStatus());//SimpleFieldAssign//sourceId:348827_1
queryTargetTempListReqDto.setObjectiveTemplateType(reqDto.getObjectiveTemplateType());//SimpleFieldAssign//sourceId:348828_1
queryTargetTempListReqDto.setObjectiveValueType(reqDto.getObjectiveValueType());//SimpleFieldAssign//sourceId:348829_1
queryTargetTempListReqDto.setObjectiveValueSource(reqDto.getObjectiveValueSource());//SimpleFieldAssign//sourceId:348830_1
queryTargetTempListReqDto.setIsRecommend(reqDto.getIsRecommend());//SimpleFieldAssign//sourceId:348831_1
queryTargetTempListReqDto.setIsArchive(reqDto.getIsArchive());//SimpleFieldAssign//sourceId:348832_1
    }
  
    /*D3-1查指标模板列表[2209]   */
    Assert.isNull(queryTargetTempListReqDto.getCreateInductionId(),"B3-1查我创建的指标模板列表(管理)-D3-1查指标模板列表-创建人就职记录ID不能为空",false);
Assert.isNull(queryTargetTempListReqDto.getIsArchive(),"B3-1查我创建的指标模板列表(管理)-D3-1查指标模板列表-是否存档不能为空",false);
Assert.isNull(queryTargetTempListReqDto.getSpaceId(),"B3-1查我创建的指标模板列表(管理)-D3-1查指标模板列表-创建于空间ID不能为空",false);
      queryTargetTempListRespDto = fwAppTargetTempClient.queryTargetTempList(queryTargetTempListReqDto).getData();
      
      
      queryTargetTempListRespDto_1 = queryTargetTempListRespDto;
    
//步骤1: D1-3批量查询就职记录列表（公共） - batchQueryInductionRecordListCom
     BatchQueryInductionRecordListComRespDto batchQueryInductionRecordListComRespDto = null;
    if(queryTargetTempListRespDto !=null){
          BatchQueryInductionRecordListComReqDto batchQueryInductionRecordListComReqDto=new BatchQueryInductionRecordListComReqDto();
  if(queryTargetTempListRespDto!=null){
      batchQueryInductionRecordListComReqDto.setPerOrgInductionRecordList(queryTargetTempListRespDto.getTargetTempList().stream().map(item->item.getOperationInductionId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:64823_1
    }
  
    /*D1-3批量查询就职记录列表（公共）[602]   */
    
      batchQueryInductionRecordListComRespDto = fwBaseInductionRecordClient.batchQueryInductionRecordListCom(batchQueryInductionRecordListComReqDto).getData();
      
      
      batchQueryInductionRecordListComRespDto_1 = batchQueryInductionRecordListComRespDto;
           }
    
BffQueryMyCreateTargetTempListRespDto retData = new BffQueryMyCreateTargetTempListRespDto();
  //数据集融合  MoreListToOneSource
        if(queryTargetTempListRespDto_1!= null && !CollectionUtil.isEmpty(queryTargetTempListRespDto_1.getTargetTempList()) ){
          for (TargetTempDto targetTempDto : queryTargetTempListRespDto_1.getTargetTempList()) {
              BffTargetTempDto retElm = new BffTargetTempDto();
             if(queryTargetTempListRespDto_1!=null){
      retElm.setObjectiveTemplateId(targetTempDto.getObjectiveTemplateId());//SimpleFieldAssign//sourceId:105714_2
retElm.setObjectiveTemplateNumber(targetTempDto.getObjectiveTemplateNumber());//SimpleFieldAssign//sourceId:105715_2
retElm.setObjectiveTemplateName(targetTempDto.getObjectiveTemplateName());//SimpleFieldAssign//sourceId:105716_2
retElm.setIsRecommend(targetTempDto.getIsRecommend());//SimpleFieldAssign//sourceId:105717_2
retElm.setSubjectLifeCycle(targetTempDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:105718_2
retElm.setOperationInductionId(targetTempDto.getOperationInductionId());//SimpleFieldAssign//sourceId:105719_2
retElm.setOperateTime(targetTempDto.getOperateTime());//SimpleFieldAssign//sourceId:105720_2
    }
              retData.getTargetTempList().add(retElm);
               if(batchQueryInductionRecordListComRespDto_1!= null){
          for (PerOrgInductionRecordDto perOrgInductionRecordDto : batchQueryInductionRecordListComRespDto_1.getPerOrgInductionRecordList()) {
                if (perOrgInductionRecordDto.getInductionRecordId().equals(targetTempDto.getOperationInductionId())) {
                 if(batchQueryInductionRecordListComRespDto_1!=null){
      retElm.setNickName(perOrgInductionRecordDto.getNickName());//SimpleFieldAssign//sourceId:105722_2
retElm.setIdCardName(perOrgInductionRecordDto.getIdCardName());//SimpleFieldAssign//sourceId:105721_2
retElm.setUserFace(perOrgInductionRecordDto.getUserFace());//SimpleFieldAssign//sourceId:105723_2
    }
                }
            }
          }
        
          }
        }//sourceId:370675_1
  

  
  
return retData;
  }
/**
   * B3-1查指标模板详情(管理)[2211]
   * gen by moon at 12/9/2022, 2:27:47 PM
   */
    @Trace(operationName = "B3-1查指标模板详情(管理)")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffQueryTargetTempDetailRespDto queryTargetTempDetail(BffQueryTargetTempDetailReqDto reqDto){
      
       
       QueryTargetTempDetailRespDto queryTargetTempDetailRespDto_1 =null;
QueryInductionRecordInfoDetailComRespDto queryInductionRecordInfoDetailComRespDto_1 =null;
//步骤0: D3-1查指标模板详情 - queryTargetTempDetail
     QueryTargetTempDetailRespDto queryTargetTempDetailRespDto = null;
    QueryTargetTempDetailReqDto queryTargetTempDetailReqDto=new QueryTargetTempDetailReqDto();
  if(reqDto!=null){
      queryTargetTempDetailReqDto.setObjectiveTemplateId(reqDto.getObjectiveTemplateId());//SimpleFieldAssign//sourceId:64928_1
    }
  
    /*D3-1查指标模板详情[2212]   */
    Assert.isNull(queryTargetTempDetailReqDto.getObjectiveTemplateId(),"B3-1查指标模板详情(管理)-D3-1查指标模板详情-指标模板ID不能为空",false);
      queryTargetTempDetailRespDto = fwAppTargetTempClient.queryTargetTempDetail(queryTargetTempDetailReqDto).getData();
      
      
      queryTargetTempDetailRespDto_1 = queryTargetTempDetailRespDto;
    
//步骤1: D1-3查询个人就职记录信息详情（公共） - queryInductionRecordInfoDetailCom
     QueryInductionRecordInfoDetailComRespDto queryInductionRecordInfoDetailComRespDto = null;
    if(queryTargetTempDetailRespDto !=null){
          QueryInductionRecordInfoDetailComReqDto queryInductionRecordInfoDetailComReqDto=new QueryInductionRecordInfoDetailComReqDto();
  if(queryTargetTempDetailRespDto!=null){
      queryInductionRecordInfoDetailComReqDto.setInductionRecordId(queryTargetTempDetailRespDto.getOperationInductionId());//SimpleFieldAssign//sourceId:64984_1
    }
  
    /*D1-3查询个人就职记录信息详情（公共）[715]   */
    Assert.isNull(queryInductionRecordInfoDetailComReqDto.getInductionRecordId(),"B3-1查指标模板详情(管理)-D1-3查询个人就职记录信息详情（公共）-就职记录ID不能为空",false);
      queryInductionRecordInfoDetailComRespDto = fwBaseInductionRecordClient.queryInductionRecordInfoDetailCom(queryInductionRecordInfoDetailComReqDto).getData();
      
      
      queryInductionRecordInfoDetailComRespDto_1 = queryInductionRecordInfoDetailComRespDto;
           }
    
BffQueryTargetTempDetailRespDto retData = new BffQueryTargetTempDetailRespDto();
  if(queryTargetTempDetailRespDto_1!=null){
      retData.setObjectiveTemplateId(queryTargetTempDetailRespDto_1.getObjectiveTemplateId());//SimpleFieldAssign//sourceId:64991_1
retData.setObjectiveTemplateNumber(queryTargetTempDetailRespDto_1.getObjectiveTemplateNumber());//SimpleFieldAssign//sourceId:65006_1
retData.setObjectiveTemplateName(queryTargetTempDetailRespDto_1.getObjectiveTemplateName());//SimpleFieldAssign//sourceId:65007_1
retData.setObjectiveTemplateDesc(queryTargetTempDetailRespDto_1.getObjectiveTemplateDesc());//SimpleFieldAssign//sourceId:65008_1
retData.setObjectiveTemplate(queryTargetTempDetailRespDto_1.getObjectiveTemplate());//SimpleFieldAssign//sourceId:65010_1
retData.setRemark(queryTargetTempDetailRespDto_1.getRemark());//SimpleFieldAssign//sourceId:65009_1
retData.setObjectiveTemplateType(queryTargetTempDetailRespDto_1.getObjectiveTemplateType());//SimpleFieldAssign//sourceId:64992_1
retData.setObjectiveValueType(queryTargetTempDetailRespDto_1.getObjectiveValueType());//SimpleFieldAssign//sourceId:64995_1
retData.setIsTargetValue(queryTargetTempDetailRespDto_1.getIsTargetValue());//SimpleFieldAssign//sourceId:64993_1
retData.setIsLeft(queryTargetTempDetailRespDto_1.getIsLeft());//SimpleFieldAssign//sourceId:64997_1
retData.setUnit(queryTargetTempDetailRespDto_1.getUnit());//SimpleFieldAssign//sourceId:65001_1
retData.setDigitalUnit(queryTargetTempDetailRespDto_1.getDigitalUnit());//SimpleFieldAssign//sourceId:496489_1
retData.setObjectiveValueSource(queryTargetTempDetailRespDto_1.getObjectiveValueSource());//SimpleFieldAssign//sourceId:65002_1
retData.setIsUseevaluationTemplate(queryTargetTempDetailRespDto_1.getIsUseevaluationTemplate());//SimpleFieldAssign//sourceId:64999_1
retData.setIsResultIndicator(queryTargetTempDetailRespDto_1.getIsResultIndicator());//SimpleFieldAssign//sourceId:65004_1
retData.setSystemDockingType(queryTargetTempDetailRespDto_1.getSystemDockingType());//SimpleFieldAssign//sourceId:65003_1
retData.setIsTemporaryLock(queryTargetTempDetailRespDto_1.getIsTemporaryLock());//SimpleFieldAssign//sourceId:496488_1
retData.setIsRecommend(queryTargetTempDetailRespDto_1.getIsRecommend());//SimpleFieldAssign//sourceId:65005_1
retData.setSubjectLifeCycle(queryTargetTempDetailRespDto_1.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:65011_1
retData.setOperationInductionId(queryTargetTempDetailRespDto_1.getOperationInductionId());//SimpleFieldAssign//sourceId:65012_1
retData.setOperateTime(queryTargetTempDetailRespDto_1.getOperateTime());//SimpleFieldAssign//sourceId:65013_1
    }
if(queryInductionRecordInfoDetailComRespDto_1!=null){
      retData.setUserId(queryInductionRecordInfoDetailComRespDto_1.getUserId());//SimpleFieldAssign//sourceId:64994_1
retData.setUserFace(queryInductionRecordInfoDetailComRespDto_1.getUserFace());//SimpleFieldAssign//sourceId:65000_1
retData.setIdCardName(queryInductionRecordInfoDetailComRespDto_1.getIdCardName());//SimpleFieldAssign//sourceId:64996_1
retData.setNickName(queryInductionRecordInfoDetailComRespDto_1.getNickName());//SimpleFieldAssign//sourceId:64998_1
    }
  

  
  
return retData;
  }
/**
   * B3-1新增指标模板(管理)[2214]
   * gen by moon at 4/25/2024, 10:09:15 PM
   */
    @Trace(operationName = "B3-1新增指标模板(管理)")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffAddTargetTempRespDto addTargetTemp(BffAddTargetTempReqDto reqDto){
      
       
       AddTargetTempRespDto addTargetTempRespDto_1 =null;
//步骤0: D3-1新增指标模板 - addTargetTemp
     AddTargetTempRespDto addTargetTempRespDto = null;
    AddTargetTempReqDto addTargetTempReqDto=new AddTargetTempReqDto();
  addTargetTempReqDto.setIsRecommend("FALSE");//sourceId:499232_1
addTargetTempReqDto.setIsTemporaryLock("FALSE");//sourceId:349038_1
addTargetTempReqDto.setTagSource("CREATE_SELF");//sourceId:350000_1
addTargetTempReqDto.setBizAppCode("TARGET_TEMPLATE_APP");//CUSTOM_CONVENTION//sourceId:388716_1
addTargetTempReqDto.setBusinessSceneCode("OBJECTIVE_TEMP_MGT");//CUSTOM_CONVENTION//sourceId:350002_1
if(reqDto!=null){
      addTargetTempReqDto.setObjectiveTemplateName(reqDto.getObjectiveTemplateName());//SimpleFieldAssign//sourceId:65073_1
addTargetTempReqDto.setRemark(reqDto.getRemark());//SimpleFieldAssign//sourceId:65075_1
addTargetTempReqDto.setObjectiveTemplateDesc(reqDto.getObjectiveTemplateDesc());//SimpleFieldAssign//sourceId:65076_1
addTargetTempReqDto.setObjectiveTemplate(reqDto.getObjectiveTemplate());//SimpleFieldAssign//sourceId:65077_1
addTargetTempReqDto.setObjectiveValueType(reqDto.getObjectiveValueType());//SimpleFieldAssign//sourceId:65080_1
addTargetTempReqDto.setIsLeft(reqDto.getIsLeft());//SimpleFieldAssign//sourceId:65081_1
addTargetTempReqDto.setUnit(reqDto.getUnit());//SimpleFieldAssign//sourceId:65083_1
addTargetTempReqDto.setDigitalUnit(reqDto.getDigitalUnit());//SimpleFieldAssign//sourceId:376892_1
addTargetTempReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:65085_1
    }
  
    /*D3-1新增指标模板[2215]   */
    Assert.isNull(addTargetTempReqDto.getObjectiveTemplateName(),"B3-1新增指标模板(管理)-D3-1新增指标模板-指标模板名称不能为空",false);
Assert.isNull(addTargetTempReqDto.getObjectiveTemplate(),"B3-1新增指标模板(管理)-D3-1新增指标模板-示例描述不能为空",false);
Assert.isNull(addTargetTempReqDto.getObjectiveValueType(),"B3-1新增指标模板(管理)-D3-1新增指标模板-指标业务类型不能为空",false);
Assert.isNull(addTargetTempReqDto.getIsRecommend(),"B3-1新增指标模板(管理)-D3-1新增指标模板-是否推荐不能为空",false);
Assert.isNull(addTargetTempReqDto.getIsTemporaryLock(),"B3-1新增指标模板(管理)-D3-1新增指标模板-临时锁定不能为空",false);
Assert.isNull(addTargetTempReqDto.getTagSource(),"B3-1新增指标模板(管理)-D3-1新增指标模板-标签来源方式不能为空",false);
Assert.isNull(addTargetTempReqDto.getBizAppCode(),"B3-1新增指标模板(管理)-D3-1新增指标模板-归属业务应用标识不能为空",false);
Assert.isNull(addTargetTempReqDto.getBusinessSceneCode(),"B3-1新增指标模板(管理)-D3-1新增指标模板-归属业务场景标识不能为空",false);
Assert.isNull(addTargetTempReqDto.getSubjectLifeCycle(),"B3-1新增指标模板(管理)-D3-1新增指标模板-主体生命周期不能为空",false);
      addTargetTempRespDto = fwAppTargetTempClient.addTargetTemp(addTargetTempReqDto).getData()/*vcase invoke 跨dubbo调用;*/;
      
      
      addTargetTempRespDto_1 = addTargetTempRespDto;
    
BffAddTargetTempRespDto retData = new BffAddTargetTempRespDto();
  if(addTargetTempRespDto_1!=null){
      retData.setObjectiveTemplateId(addTargetTempRespDto_1.getObjectiveTemplateId());//SimpleFieldAssign//sourceId:65100_1
    }
  

  
  
return retData;
  }
/**
   * B3-1修改指标模板(管理)[2217]
   * gen by moon at 12/9/2022, 2:27:50 PM
   */
    @Trace(operationName = "B3-1修改指标模板(管理)")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffUpdateTargetTempRespDto updateTargetTemp(BffUpdateTargetTempReqDto reqDto){
      
       
       //步骤0: D3-1修改指标模板 - updateTargetTemp
     UpdateTargetTempRespDto updateTargetTempRespDto = null;
    UpdateTargetTempReqDto updateTargetTempReqDto=new UpdateTargetTempReqDto();
  if(reqDto!=null){
      updateTargetTempReqDto.setObjectiveTemplateId(reqDto.getObjectiveTemplateId());//SimpleFieldAssign//sourceId:349126_1
updateTargetTempReqDto.setObjectiveTemplateName(reqDto.getObjectiveTemplateName());//SimpleFieldAssign//sourceId:349128_1
updateTargetTempReqDto.setObjectiveTemplate(reqDto.getObjectiveTemplate());//SimpleFieldAssign//sourceId:349142_1
updateTargetTempReqDto.setRemark(reqDto.getRemark());//SimpleFieldAssign//sourceId:349141_1
updateTargetTempReqDto.setObjectiveTemplateDesc(reqDto.getObjectiveTemplateDesc());//SimpleFieldAssign//sourceId:349140_1
updateTargetTempReqDto.setObjectiveValueType(reqDto.getObjectiveValueType());//SimpleFieldAssign//sourceId:349131_1
updateTargetTempReqDto.setIsLeft(reqDto.getIsLeft());//SimpleFieldAssign//sourceId:349132_1
updateTargetTempReqDto.setUnit(reqDto.getUnit());//SimpleFieldAssign//sourceId:349134_1
updateTargetTempReqDto.setDigitalUnit(reqDto.getDigitalUnit());//SimpleFieldAssign//sourceId:382155_1
updateTargetTempReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:349143_1
    }
  
    /*D3-1修改指标模板[2219]   */
    Assert.isNull(updateTargetTempReqDto.getObjectiveTemplateId(),"B3-1修改指标模板(管理)-D3-1修改指标模板-指标模板ID不能为空",false);
      updateTargetTempRespDto = fwAppTargetTempClient.updateTargetTemp(updateTargetTempReqDto).getData();
      
      
      
    
BffUpdateTargetTempRespDto retData = new BffUpdateTargetTempRespDto();
  
  

  
  
return retData;
  }
/**
   * B3-1新增牵头部门的指标模板(管理)[2753]
   * gen by moon at 12/9/2022, 2:27:54 PM
   */
    @Trace(operationName = "B3-1新增牵头部门的指标模板(管理)")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffAddLeadDeptTargetTempRespDto addLeadDeptTargetTemp(BffAddLeadDeptTargetTempReqDto reqDto){
      
       
       AddLeadDeptTargetTempRespDto addLeadDeptTargetTempRespDto_1 =null;
//步骤0: D3-1新增牵头部门的指标模板 - addLeadDeptTargetTemp
     AddLeadDeptTargetTempRespDto addLeadDeptTargetTempRespDto = null;
    AddLeadDeptTargetTempReqDto addLeadDeptTargetTempReqDto=new AddLeadDeptTargetTempReqDto();
addLeadDeptTargetTempReqDto.setIsRecommend("TRUE");//sourceId:376897_1
addLeadDeptTargetTempReqDto.setSubjectLifeCycle("EDITING");//sourceId:87089_1
if(reqDto!=null){
      addLeadDeptTargetTempReqDto.setObjectiveTemplateName(reqDto.getObjectiveTemplateName());//SimpleFieldAssign//sourceId:87054_1
addLeadDeptTargetTempReqDto.setRemark(reqDto.getRemark());//SimpleFieldAssign//sourceId:87056_1
addLeadDeptTargetTempReqDto.setObjectiveTemplateDesc(reqDto.getObjectiveTemplateDesc());//SimpleFieldAssign//sourceId:87057_1
addLeadDeptTargetTempReqDto.setObjectiveTemplate(reqDto.getObjectiveTemplate());//SimpleFieldAssign//sourceId:87058_1
addLeadDeptTargetTempReqDto.setObjectiveValueType(reqDto.getObjectiveValueType());//SimpleFieldAssign//sourceId:87061_1
addLeadDeptTargetTempReqDto.setIsLeft(reqDto.getIsLeft());//SimpleFieldAssign//sourceId:87062_1
addLeadDeptTargetTempReqDto.setUnit(reqDto.getUnit());//SimpleFieldAssign//sourceId:87064_1
addLeadDeptTargetTempReqDto.setDigitalUnit(reqDto.getDigitalUnit());//SimpleFieldAssign//sourceId:376890_1
addLeadDeptTargetTempReqDto.setTagName(reqDto.getTagName());//SimpleFieldAssign//sourceId:87067_1
    }
  
    /*D3-1新增牵头部门的指标模板[2754]   */
    Assert.isNull(addLeadDeptTargetTempReqDto.getObjectiveTemplateName(),"B3-1新增牵头部门的指标模板(管理)-D3-1新增牵头部门的指标模板-指标模板名称不能为空",false);
Assert.isNull(addLeadDeptTargetTempReqDto.getObjectiveTemplate(),"B3-1新增牵头部门的指标模板(管理)-D3-1新增牵头部门的指标模板-示例描述不能为空",false);
Assert.isNull(addLeadDeptTargetTempReqDto.getObjectiveValueType(),"B3-1新增牵头部门的指标模板(管理)-D3-1新增牵头部门的指标模板-指标业务类型不能为空",false);
Assert.isNull(addLeadDeptTargetTempReqDto.getIsLeft(),"B3-1新增牵头部门的指标模板(管理)-D3-1新增牵头部门的指标模板-是否左侧比例型不能为空",false);
Assert.isNull(addLeadDeptTargetTempReqDto.getIsRecommend(),"B3-1新增牵头部门的指标模板(管理)-D3-1新增牵头部门的指标模板-是否推荐不能为空",false);
Assert.isNull(addLeadDeptTargetTempReqDto.getSubjectLifeCycle(),"B3-1新增牵头部门的指标模板(管理)-D3-1新增牵头部门的指标模板-主体生命周期不能为空",false);
Assert.isNull(addLeadDeptTargetTempReqDto.getTagName(),"B3-1新增牵头部门的指标模板(管理)-D3-1新增牵头部门的指标模板-标签名称不能为空",false);
      addLeadDeptTargetTempRespDto = fwAppTargetTempClient.addLeadDeptTargetTemp(addLeadDeptTargetTempReqDto).getData();
      
      
      addLeadDeptTargetTempRespDto_1 = addLeadDeptTargetTempRespDto;
    
BffAddLeadDeptTargetTempRespDto retData = new BffAddLeadDeptTargetTempRespDto();
  if(addLeadDeptTargetTempRespDto_1!=null){
      retData.setObjectiveTemplateId(addLeadDeptTargetTempRespDto_1.getObjectiveTemplateId());//SimpleFieldAssign//sourceId:87085_1
retData.setTagId(addLeadDeptTargetTempRespDto_1.getTagId());//SimpleFieldAssign//sourceId:87086_1
retData.setTagContentRecordId(addLeadDeptTargetTempRespDto_1.getTagContentRecordId());//SimpleFieldAssign//sourceId:87087_1
    }
  

  
  
return retData;
  }
/**
   * B3-1删除我创建的指标模板(管理)[2762]
   * gen by moon at 12/2/2022, 5:08:54 PM
   */
    @Trace(operationName = "B3-1删除我创建的指标模板(管理)")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffDeleteIcreateTargetTempRespDto deleteIcreateTargetTemp(BffDeleteIcreateTargetTempReqDto reqDto){
      
       
       //步骤0: D3-1删除牵头部门的指标模板 - deleteLeadDeptTargetTemp
     DeleteLeadDeptTargetTempRespDto deleteLeadDeptTargetTempRespDto = null;
    DeleteLeadDeptTargetTempReqDto deleteLeadDeptTargetTempReqDto=new DeleteLeadDeptTargetTempReqDto();
  if(reqDto!=null){
      deleteLeadDeptTargetTempReqDto.setObjectiveTemplateId(reqDto.getObjectiveTemplateId());//SimpleFieldAssign//sourceId:87203_1
    }
  
    /*D3-1删除牵头部门的指标模板[2763]   */
    Assert.isNull(deleteLeadDeptTargetTempReqDto.getObjectiveTemplateId(),"B3-1删除我创建的指标模板(管理)-D3-1删除牵头部门的指标模板-指标模板ID不能为空",false);
      deleteLeadDeptTargetTempRespDto = fwAppTargetTempClient.deleteLeadDeptTargetTemp(deleteLeadDeptTargetTempReqDto).getData();
      
      
      
    
BffDeleteIcreateTargetTempRespDto retData = new BffDeleteIcreateTargetTempRespDto();
  
  

  
  
return retData;
  }
/**
   * B3-1查询指标模板列表(管理)[4017]
   * gen by moon at 12/6/2022, 4:59:40 PM
   */
    @Trace(operationName = "B3-1查询指标模板列表(管理)")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffQueryManageTargetTempListRespDto queryManageTargetTempList(BffQueryManageTargetTempListReqDto reqDto){
      
       
       QueryTargetTempListRespDto queryTargetTempListRespDto_1 =null;
BatchQueryInductionRecordListComRespDto batchQueryInductionRecordListComRespDto_1 =null;
//步骤0: D3-1查指标模板列表 - queryTargetTempList
     QueryTargetTempListRespDto queryTargetTempListRespDto = null;
    QueryTargetTempListReqDto queryTargetTempListReqDto=new QueryTargetTempListReqDto();
  queryTargetTempListReqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:349186_1
if(reqDto!=null){
      queryTargetTempListReqDto.setContTagRcordList(reqDto.getContTagRcordList());//list-field-assign//sourceId:349177_1
queryTargetTempListReqDto.setObjectiveTemplateName(reqDto.getObjectiveTemplateName());//SimpleFieldAssign//sourceId:349178_1
queryTargetTempListReqDto.setApplyStatus(reqDto.getApplyStatus());//SimpleFieldAssign//sourceId:349179_1
queryTargetTempListReqDto.setObjectiveTemplateType(reqDto.getObjectiveTemplateType());//SimpleFieldAssign//sourceId:349180_1
queryTargetTempListReqDto.setObjectiveValueType(reqDto.getObjectiveValueType());//SimpleFieldAssign//sourceId:349181_1
queryTargetTempListReqDto.setObjectiveValueSource(reqDto.getObjectiveValueSource());//SimpleFieldAssign//sourceId:349182_1
queryTargetTempListReqDto.setIsRecommend(reqDto.getIsRecommend());//SimpleFieldAssign//sourceId:349183_1
queryTargetTempListReqDto.setIsArchive(reqDto.getIsArchive());//SimpleFieldAssign//sourceId:349184_1
queryTargetTempListReqDto.setCreateInductionId(reqDto.getCreateInductionId());//SimpleFieldAssign//sourceId:488920_1
    }
  
    /*D3-1查指标模板列表[2209]   */
    Assert.isNull(queryTargetTempListReqDto.getIsArchive(),"B3-1查询指标模板列表(管理)-D3-1查指标模板列表-是否存档不能为空",false);
Assert.isNull(queryTargetTempListReqDto.getSpaceId(),"B3-1查询指标模板列表(管理)-D3-1查指标模板列表-创建于空间ID不能为空",false);
      queryTargetTempListRespDto = fwAppTargetTempClient.queryTargetTempList(queryTargetTempListReqDto).getData();
      
      
      queryTargetTempListRespDto_1 = queryTargetTempListRespDto;
    
//步骤1: D1-3批量查询就职记录列表（公共） - batchQueryInductionRecordListCom
     BatchQueryInductionRecordListComRespDto batchQueryInductionRecordListComRespDto = null;
    BatchQueryInductionRecordListComReqDto batchQueryInductionRecordListComReqDto=new BatchQueryInductionRecordListComReqDto();
  if(queryTargetTempListRespDto!=null){
      batchQueryInductionRecordListComReqDto.setPerOrgInductionRecordList(queryTargetTempListRespDto.getTargetTempList().stream().map(item->item.getOperationInductionId())
        .collect(Collectors.toList()));/*list-to-strings*///sourceId:349188_1
    }
  
    /*D1-3批量查询就职记录列表（公共）[602]   */
    
      batchQueryInductionRecordListComRespDto = fwBaseInductionRecordClient.batchQueryInductionRecordListCom(batchQueryInductionRecordListComReqDto).getData();
      
      
      batchQueryInductionRecordListComRespDto_1 = batchQueryInductionRecordListComRespDto;
    
BffQueryManageTargetTempListRespDto retData = new BffQueryManageTargetTempListRespDto();
  //数据集融合  MoreListToOneSource
        if(queryTargetTempListRespDto_1!= null && !CollectionUtil.isEmpty(queryTargetTempListRespDto_1.getTargetTempList()) ){
          for (TargetTempDto targetTempDto : queryTargetTempListRespDto_1.getTargetTempList()) {
              BffTargetTempDto retElm = new BffTargetTempDto();
             if(queryTargetTempListRespDto_1!=null){
      retElm.setObjectiveTemplateId(targetTempDto.getObjectiveTemplateId());//SimpleFieldAssign//sourceId:101950_2
retElm.setObjectiveTemplateNumber(targetTempDto.getObjectiveTemplateNumber());//SimpleFieldAssign//sourceId:101951_2
retElm.setObjectiveTemplateName(targetTempDto.getObjectiveTemplateName());//SimpleFieldAssign//sourceId:101952_2
retElm.setObjectiveValueType(targetTempDto.getObjectiveValueType());//SimpleFieldAssign//sourceId:101953_2
retElm.setIsRecommend(targetTempDto.getIsRecommend());//SimpleFieldAssign//sourceId:101954_2
retElm.setSubjectLifeCycle(targetTempDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:101955_2
retElm.setOperationInductionId(targetTempDto.getOperationInductionId());//SimpleFieldAssign//sourceId:101956_2
retElm.setOperateTime(targetTempDto.getOperateTime());//SimpleFieldAssign//sourceId:101957_2
    }
              retData.getTargetTempList().add(retElm);
               if(batchQueryInductionRecordListComRespDto_1!= null){
          for (PerOrgInductionRecordDto perOrgInductionRecordDto : batchQueryInductionRecordListComRespDto_1.getPerOrgInductionRecordList()) {
                if (perOrgInductionRecordDto.getInductionRecordId().equals(targetTempDto.getOperationInductionId())) {
                 if(batchQueryInductionRecordListComRespDto_1!=null){
      retElm.setNickName(perOrgInductionRecordDto.getNickName());//SimpleFieldAssign//sourceId:101959_2
retElm.setIdCardName(perOrgInductionRecordDto.getIdCardName());//SimpleFieldAssign//sourceId:101958_2
retElm.setUserFace(perOrgInductionRecordDto.getUserFace());//SimpleFieldAssign//sourceId:101960_2
    }
                }
            }
          }
        
          }
        }//sourceId:349199_1
  

  retData.setPageNum(queryTargetTempListRespDto.getPageNum());
        retData.setPageSize(queryTargetTempListRespDto.getPageSize());
        retData.setTotal(queryTargetTempListRespDto.getTotalNum());
        retData.setIsLastPage((Math.ceil(Double.valueOf(queryTargetTempListRespDto.getTotalNum()) / Double.valueOf(queryTargetTempListRespDto.getPageSize()))) <= retData.getPageNum());
        
  
return retData;
  }
/**
   * B3-1修改牵头部门的指标模板(管理)[2759]
   * gen by moon at 12/9/2022, 2:27:55 PM
   */
    @Trace(operationName = "B3-1修改牵头部门的指标模板(管理)")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffUpdateLeadDeptTargetTempRespDto updateLeadDeptTargetTemp(BffUpdateLeadDeptTargetTempReqDto reqDto){
      
       
       //步骤0: D3-1修改指标模板 - updateTargetTemp
     UpdateTargetTempRespDto updateTargetTempRespDto = null;
    UpdateTargetTempReqDto updateTargetTempReqDto=new UpdateTargetTempReqDto();
  if(reqDto!=null){
      updateTargetTempReqDto.setObjectiveTemplateId(reqDto.getObjectiveTemplateId());//SimpleFieldAssign//sourceId:87155_1
updateTargetTempReqDto.setObjectiveTemplateName(reqDto.getObjectiveTemplateName());//SimpleFieldAssign//sourceId:87157_1
updateTargetTempReqDto.setObjectiveTemplateDesc(reqDto.getObjectiveTemplateDesc());//SimpleFieldAssign//sourceId:87169_1
updateTargetTempReqDto.setRemark(reqDto.getRemark());//SimpleFieldAssign//sourceId:87170_1
updateTargetTempReqDto.setObjectiveTemplate(reqDto.getObjectiveTemplate());//SimpleFieldAssign//sourceId:87171_1
updateTargetTempReqDto.setObjectiveValueType(reqDto.getObjectiveValueType());//SimpleFieldAssign//sourceId:87160_1
updateTargetTempReqDto.setIsLeft(reqDto.getIsLeft());//SimpleFieldAssign//sourceId:87161_1
updateTargetTempReqDto.setUnit(reqDto.getUnit());//SimpleFieldAssign//sourceId:87163_1
updateTargetTempReqDto.setDigitalUnit(reqDto.getDigitalUnit());//SimpleFieldAssign//sourceId:376902_1
    }
  
    /*D3-1修改指标模板[2219]   */
    Assert.isNull(updateTargetTempReqDto.getObjectiveTemplateId(),"B3-1修改牵头部门的指标模板(管理)-D3-1修改指标模板-指标模板ID不能为空",false);
      updateTargetTempRespDto = fwAppTargetTempClient.updateTargetTemp(updateTargetTempReqDto).getData();
      
      
      
    
BffUpdateLeadDeptTargetTempRespDto retData = new BffUpdateLeadDeptTargetTempRespDto();
  
  

  
  
return retData;
  }
/**
   * B3-1检查删除我创建的指标模板条件(管理)[2766]
   * gen by moon at 10/8/2022, 3:09:08 AM
   */
    @Trace(operationName = "B3-1检查删除我创建的指标模板条件(管理)")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffCheckIcreateTargetTempRespDto checkIcreateTargetTemp(BffCheckIcreateTargetTempReqDto reqDto){
      
       
       CheckLeadDeptTargetTempRespDto checkLeadDeptTargetTempRespDto_1 =null;
//步骤0: D3-1检查删除牵头部门的指标模板条件 - checkLeadDeptTargetTemp
     CheckLeadDeptTargetTempRespDto checkLeadDeptTargetTempRespDto = null;
    CheckLeadDeptTargetTempReqDto checkLeadDeptTargetTempReqDto=new CheckLeadDeptTargetTempReqDto();
  if(reqDto!=null){
      checkLeadDeptTargetTempReqDto.setObjectiveTemplateId(reqDto.getObjectiveTemplateId());//SimpleFieldAssign//sourceId:87259_1
checkLeadDeptTargetTempReqDto.setCorrelationLastTargetCatId(reqDto.getCorrelationLastTargetCatId());//SimpleFieldAssign//sourceId:87260_1
    }
  
    /*D3-1检查删除牵头部门的指标模板条件[2767]   */
    Assert.isNull(checkLeadDeptTargetTempReqDto.getObjectiveTemplateId(),"B3-1检查删除我创建的指标模板条件(管理)-D3-1检查删除牵头部门的指标模板条件-冗余指标模板ID不能为空",false);
Assert.isNull(checkLeadDeptTargetTempReqDto.getCorrelationLastTargetCatId(),"B3-1检查删除我创建的指标模板条件(管理)-D3-1检查删除牵头部门的指标模板条件-关联末级目标分类ID不能为空",false);
      checkLeadDeptTargetTempRespDto = fwAppTargetTempClient.checkLeadDeptTargetTemp(checkLeadDeptTargetTempReqDto).getData();
      
      
      checkLeadDeptTargetTempRespDto_1 = checkLeadDeptTargetTempRespDto;
    
BffCheckIcreateTargetTempRespDto retData = new BffCheckIcreateTargetTempRespDto();
  if(checkLeadDeptTargetTempRespDto_1!=null){
      //list-field-assign
    retData.setTargetObjList(checkLeadDeptTargetTempRespDto_1.getTargetObjList());//sourceId:87264_1
    }
  

  
  
return retData;
  }
/**
   * B3-2删除指标模板(管理)[4935]
   * gen by moon at 10/18/2022, 6:12:53 AM
   */
    @Trace(operationName = "B3-2删除指标模板(管理)")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffDeleteTargetTempRespDto deleteTargetTemp(BffDeleteTargetTempReqDto reqDto){
      
       
       //步骤0: D3-2删除指标模板 - deleteTargetTemp
     DeleteTargetTempRespDto deleteTargetTempRespDto = null;
    DeleteTargetTempReqDto deleteTargetTempReqDto=new DeleteTargetTempReqDto();
  if(reqDto!=null){
      deleteTargetTempReqDto.setObjectiveTemplateId(reqDto.getObjectiveTemplateId());//SimpleFieldAssign//sourceId:382243_1
    }
  
    /*D3-2删除指标模板[4936]   */
    Assert.isNull(deleteTargetTempReqDto.getObjectiveTemplateId(),"B3-2删除指标模板(管理)-D3-2删除指标模板-指标模板ID不能为空",false);
      deleteTargetTempRespDto = fwAppTargetTempClient.deleteTargetTemp(deleteTargetTempReqDto).getData();
      
      
      
    
BffDeleteTargetTempRespDto retData = new BffDeleteTargetTempRespDto();
  
  

  
  
return retData;
  }
/**
   * B3-2存档指标模板(管理)[4939]
   * gen by moon at 10/19/2022, 7:22:55 PM
   */
    @Trace(operationName = "B3-2存档指标模板(管理)")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffArchiveTargetTempRespDto archiveTargetTemp(BffArchiveTargetTempReqDto reqDto){


       //步骤0: D3-2存档指标模板 - archiveTargetTemp
     ArchiveTargetTempRespDto archiveTargetTempRespDto = null;
    ArchiveTargetTempReqDto archiveTargetTempReqDto=new ArchiveTargetTempReqDto();
  if(reqDto!=null){
      archiveTargetTempReqDto.setObjectiveTemplateId(reqDto.getObjectiveTemplateId());//SimpleFieldAssign//sourceId:383421_1
    }

    /*D3-2存档指标模板[4940]   */
    Assert.isNull(archiveTargetTempReqDto.getObjectiveTemplateId(),"B3-2存档指标模板(管理)-D3-2存档指标模板-指标模板ID不能为空",false);
      archiveTargetTempRespDto = fwAppTargetTempClient.archiveTargetTemp(archiveTargetTempReqDto).getData();




BffArchiveTargetTempRespDto retData = new BffArchiveTargetTempRespDto();





return retData;
  }
/**
   * B3-2撤销存档指标模板(管理)[4941]
   * gen by moon at 10/19/2022, 7:22:56 PM
   */
    @Trace(operationName = "B3-2撤销存档指标模板(管理)")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffUndoArchiveTargetTempRespDto undoArchiveTargetTemp(BffUndoArchiveTargetTempReqDto reqDto){


       //步骤0: D3-2撤销存档指标模板 - undoArchiveTargetTemp
     UndoArchiveTargetTempRespDto undoArchiveTargetTempRespDto = null;
    UndoArchiveTargetTempReqDto undoArchiveTargetTempReqDto=new UndoArchiveTargetTempReqDto();
  if(reqDto!=null){
      undoArchiveTargetTempReqDto.setObjectiveTemplateId(reqDto.getObjectiveTemplateId());//SimpleFieldAssign//sourceId:383455_1
    }

    /*D3-2撤销存档指标模板[4942]   */
    Assert.isNull(undoArchiveTargetTempReqDto.getObjectiveTemplateId(),"B3-2撤销存档指标模板(管理)-D3-2撤销存档指标模板-指标模板ID不能为空",false);
      undoArchiveTargetTempRespDto = fwAppTargetTempClient.undoArchiveTargetTemp(undoArchiveTargetTempReqDto).getData();




BffUndoArchiveTargetTempRespDto retData = new BffUndoArchiveTargetTempRespDto();





return retData;
  }
/**
   * B3-1查询编辑的指标模板详情(管理)[5273]
   * gen by moon at 11/23/2022, 10:43:07 PM
   */
    @Trace(operationName = "B3-1查询编辑的指标模板详情(管理)")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffQueryEditTargetTempDetailRespDto queryEditTargetTempDetail(BffQueryEditTargetTempDetailReqDto reqDto){
      
       
       QueryEditTargetTempDetailRespDto queryEditTargetTempDetailRespDto_1 =null;
//步骤0: D3-1查询编辑的指标模板 - queryEditTargetTempDetail
     QueryEditTargetTempDetailRespDto queryEditTargetTempDetailRespDto = null;
    QueryEditTargetTempDetailReqDto queryEditTargetTempDetailReqDto=new QueryEditTargetTempDetailReqDto();
  if(reqDto!=null){
      queryEditTargetTempDetailReqDto.setObjectiveTemplateId(reqDto.getObjectiveTemplateId());//SimpleFieldAssign//sourceId:453564_1
    }
  
    /*D3-1查询编辑的指标模板[5274]   */
    Assert.isNull(queryEditTargetTempDetailReqDto.getObjectiveTemplateId(),"B3-1查询编辑的指标模板详情(管理)-D3-1查询编辑的指标模板-指标模板ID不能为空",false);
      queryEditTargetTempDetailRespDto = fwAppTargetTempClient.queryEditTargetTempDetail(queryEditTargetTempDetailReqDto).getData();
      
      
      queryEditTargetTempDetailRespDto_1 = queryEditTargetTempDetailRespDto;
    
BffQueryEditTargetTempDetailRespDto retData = new BffQueryEditTargetTempDetailRespDto();
  if(queryEditTargetTempDetailRespDto_1!=null){
      retData.setObjectiveTemplateId(queryEditTargetTempDetailRespDto_1.getObjectiveTemplateId());//SimpleFieldAssign//sourceId:453579_1
retData.setObjectiveTemplateType(queryEditTargetTempDetailRespDto_1.getObjectiveTemplateType());//SimpleFieldAssign//sourceId:453580_1
retData.setIsTargetValue(queryEditTargetTempDetailRespDto_1.getIsTargetValue());//SimpleFieldAssign//sourceId:453581_1
retData.setObjectiveValueType(queryEditTargetTempDetailRespDto_1.getObjectiveValueType());//SimpleFieldAssign//sourceId:453582_1
retData.setIsLeft(queryEditTargetTempDetailRespDto_1.getIsLeft());//SimpleFieldAssign//sourceId:453583_1
retData.setUnit(queryEditTargetTempDetailRespDto_1.getUnit());//SimpleFieldAssign//sourceId:453584_1
retData.setDigitalUnit(queryEditTargetTempDetailRespDto_1.getDigitalUnit());//SimpleFieldAssign//sourceId:453585_1
retData.setObjectiveTemplateNumber(queryEditTargetTempDetailRespDto_1.getObjectiveTemplateNumber());//SimpleFieldAssign//sourceId:453586_1
retData.setObjectiveTemplateName(queryEditTargetTempDetailRespDto_1.getObjectiveTemplateName());//SimpleFieldAssign//sourceId:453587_1
retData.setObjectiveTemplateDesc(queryEditTargetTempDetailRespDto_1.getObjectiveTemplateDesc());//SimpleFieldAssign//sourceId:453588_1
retData.setRemark(queryEditTargetTempDetailRespDto_1.getRemark());//SimpleFieldAssign//sourceId:453589_1
retData.setObjectiveTemplate(queryEditTargetTempDetailRespDto_1.getObjectiveTemplate());//SimpleFieldAssign//sourceId:453590_1
    }
  

  
  
return retData;
  }
 //
}
